<%@ page import="quanlythuvien.Sach" %>



<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'maSach', 'error')} required">
	<label for="maSach">
		<g:message code="sach.maSach.label" default="Ma Sach" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="maSach" maxlength="50" required="" value="${sachInstance?.maSach}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'tenSach', 'error')} required">
	<label for="tenSach">
		<g:message code="sach.tenSach.label" default="Ten Sach" />
		<span class="required-indicator">*</span>
	</label>
	<g:textArea name="tenSach" cols="40" rows="5" maxlength="255" required="" value="${sachInstance?.tenSach}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'nhaXuatBan', 'error')} ">
	<label for="nhaXuatBan">
		<g:message code="sach.nhaXuatBan.label" default="Nha Xuat Ban" />
		
	</label>
	<g:textArea name="nhaXuatBan" cols="40" rows="5" maxlength="255" value="${sachInstance?.nhaXuatBan}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'tacGia', 'error')} ">
	<label for="tacGia">
		<g:message code="sach.tacGia.label" default="Tac Gia" />
		
	</label>
	<g:textArea name="tacGia" cols="40" rows="5" maxlength="255" value="${sachInstance?.tacGia}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'donGia', 'error')} required">
	<label for="donGia">
		<g:message code="sach.donGia.label" default="Don Gia" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="donGia" step="any" required="" value="${sachInstance.donGia}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'maLoaiSach', 'error')} required">
	<label for="maLoaiSach">
		<g:message code="sach.maLoaiSach.label" default="Ma Loai Sach" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="maLoaiSach" name="maLoaiSach.id" from="${quanlythuvien.LoaiSach.list()}" optionKey="id" required="" value="${sachInstance?.maLoaiSach?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'ngayPhatHanh', 'error')} ">
	<label for="ngayPhatHanh">
		<g:message code="sach.ngayPhatHanh.label" default="Ngay Phat Hanh" />
		
	</label>
	<g:datePicker name="ngayPhatHanh" precision="day"  value="${sachInstance?.ngayPhatHanh}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: sachInstance, field: 'tinhTrang', 'error')} required">
	<label for="tinhTrang">
		<g:message code="sach.tinhTrang.label" default="Tinh Trang" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="tinhTrang" required="" value="${sachInstance.tinhTrang}"/>
</div>

